﻿@model EditSiteViewModel
@{
	ViewBag.Title = "This site";
}

<h2>@ViewBag.Title</h2>

@using (Html.BeginForm("UpdateSite", "Site", FormMethod.Post)) {
	@Html.AntiForgeryToken()
	<fieldset>
		<legend>Site properties</legend>
		<div>
			@Html.LabelFor(m => m.Name, "Site name")
			@Html.TextBoxFor(m => m.Name, new { @class = "te fe-middle" })
			@Html.ValidationMessageFor(m => m.Name)
		</div>
		<div>
			@Html.LabelFor(m => m.DefaultTheme, "Default theme")
			@Html.EditorFor(m => m.DefaultTheme, "ThemeChooser", new { ThemesListUrl = Url.Action("InstalledThemes", "Themes") })
			@Html.ValidationMessageFor(m => m.DefaultTheme)
		</div>
	</fieldset>
	<input type="submit" value="Update site properties" />
}

@section sidebar {
	<ul>
		<li>@Html.ActionLink("Themes", "Index", "Themes")</li>
		<li>@Html.ActionLink("Plugins", "Index", "Plugins")</li>
		<li>@Html.ActionLink("Widgets", "Index", "Widgets")</li>
		<li>@Html.ActionLink("Page layouts", "Index", "Layouts")</li>
	</ul>
}
